/**
*┌──────────────────────────────────────────────────────────────┐
*│　描    述：SysOrganize仓储接口                                                   
*│　作    者：sys                                              
*│　创建时间：2020-11-06 14:41:01  
*│　说    明：代码生成器生成   
*└──────────────────────────────────────────────────────────────┘
*/
using SXFramWork.Core;
using SXFramWork.Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.Threading.Tasks;

namespace SXFramWork.Repository
{
    public interface ISysOrganizeRepository : IRepository<SysOrganizeEntity>
    {
        /// <summary>
        /// 查询所有父级部门
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<List<SysOrganizeEntity>> GetParents(string orgId, IUnitOfWork unitOfWork=null);
        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<List<SysOrganizeEntity>> Query(OrgQueryModel model);
        /// <summary>
        /// 获得下级部门ids
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<List<string>> GetChildren(string id);

        Task<SysOrganizeEntity> GetById(string id);
    }
}